package com.ruoyi.project.data.domain;

import com.ruoyi.framework.web.domain.BaseEntity;

import java.util.Objects;

public class TradeRecords extends BaseEntity {
    private Double cashIncome;
    private Double zfbIncome;
    private Double cashRefund;
    private Double zfbRefund;

    public TradeRecords() {
    }

    public TradeRecords(Double cashIncome, Double zfbIncome, Double cashRefund, Double zfbRefund) {
        this.cashIncome = cashIncome;
        this.zfbIncome = zfbIncome;
        this.cashRefund = cashRefund;
        this.zfbRefund = zfbRefund;
    }

    public double getCashIncome() {
        return cashIncome;
    }

    public void setCashIncome(double cashIncome) {
        this.cashIncome = cashIncome;
    }

    public double getZfbIncome() {
        return zfbIncome;
    }

    public void setZfbIncome(double zfbIncome) {
        this.zfbIncome = zfbIncome;
    }

    public double getCashRefund() {
        return cashRefund;
    }

    public void setCashRefund(double cashRefund) {
        this.cashRefund = cashRefund;
    }

    public double getZfbRefund() {
        return zfbRefund;
    }

    public void setZfbRefund(double zfbRefund) {
        this.zfbRefund = zfbRefund;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof TradeRecords)) return false;
        TradeRecords that = (TradeRecords) o;
        return Double.compare(that.cashIncome, cashIncome) == 0 &&
                Double.compare(that.zfbIncome, zfbIncome) == 0 &&
                Double.compare(that.cashRefund, cashRefund) == 0 &&
                Double.compare(that.zfbRefund, zfbRefund) == 0;
    }

    @Override
    public int hashCode() {
        return Objects.hash(cashIncome, zfbIncome, cashRefund, zfbRefund);
    }

    @Override
    public String toString() {
        return "TradeRecords{" +
                "cashIncome=" + cashIncome +
                ", zfbIncome=" + zfbIncome +
                ", cashRefund=" + cashRefund +
                ", zfbRefund=" + zfbRefund +
                '}';
    }
}
